package com.study.pattern.spring.configure;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.view.JstlView;
import org.springframework.web.servlet.view.UrlBasedViewResolver;

import com.study.pattern.strategy.Step1;


@Configuration
@EnableWebMvc
@ComponentScan(
	basePackages = "com.study.pattern.controller"
	,useDefaultFilters = false
	,includeFilters = {@ComponentScan.Filter(Controller.class)}
)
public class SpringConfigure {
	@Bean
	public UrlBasedViewResolver myView(){
		UrlBasedViewResolver urlBasedViewResolver = new UrlBasedViewResolver();
		urlBasedViewResolver.setPrefix("/WEB-INF/jsp/");
		urlBasedViewResolver.setSuffix(".jsp");
		urlBasedViewResolver.setViewClass(JstlView.class);
		return urlBasedViewResolver;
	}
}
